home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / 386bsd-faq / part3 < prev    next >
Encoding:
Text File  |  1995-07-25  |  76.4 KB  |  1,858 lines

  1. Subject: [comp.os.386bsd] BNR/2 derived BSD for PCs FAQ (Part 3 of 10)
  2. Newsgroups: comp.os.386bsd.announce,comp.answers,news.answers
  3. From: burgess@cynjut.infonet.net (Dave Burgess)
  4. Date: 13 Nov 1994 10:41:39 -0600
  5.  
  6. Posted-By: auto-faq 3.1.1.2
  7. Archive-name: 386bsd-faq/part3
  8.  
  9. Section 2.    (Common installation questions)
  10.  
  11.  
  12. 2.0    Install process
  13.     
  14.     The 386bsd system is distributed in many ways.  One of the most 
  15.     common is via DOS diskettes, (either 3 1/2 or 5 1/4, both high 
  16.     density) with the actual distribution being a 'CPIO archive'
  17.     broken into 240K pieces.  This allows the distribution to fit
  18.     onto a minimum number of floppies. 
  19.     
  20.     Once the files are on floppies, thoughts usually turn to
  21.     questions about how to install the boot image on a floppy.  The 
  22.     rawrite program (for DOS) is used to write the bootable images 
  23.     (dist.fs and fixit.fs) onto floppies.  The same image can used 
  24.     for 3 1/2 and 5 1/4 high density diskettes.  Low density 
  25.     diskettes are not supported in this version of 386bsd.
  26.     
  27.     Once the bootable images are written onto the floppies, insert 
  28.     the dist.fs disk into the A: drive and reboot.  If the system
  29.     does not boot, see section 2.5 below for more information.
  30.     
  31.     If the disk boots, type install and proceed to use the 
  32.     INSTALL.NOTES to get more information.
  33.     
  34.     Problems with the install are either related to hardware (i.e.
  35.     Do you want to install on your T.V.?) or software.  Of the 
  36.     hardware issues, the most common FAQs are usually straight out 
  37.     of the installation notes.  Of the software issues, there are 
  38.     only two that really concern us.  The first is bad files.
  39.     
  40.     On some systems, files that are loaded from floppy appear to 
  41.     'go bad' when they arrive on the hard disk.  Try some of these 
  42.     solutions:
  43.  
  44.     - You forgot binary.  Don't get insulted.  Those of us that FTP 
  45.     for a living forget sometimes.  If so, the distribution will
  46.     come out with all different sizes and install will complain
  47.     about every disk.
  48.     
  49.     - One or two of the files are no good.  Try getting them again.  
  50.     As a precaution, rename the bad files on your hard drive to
  51.     names like foo.1 and bob.23.  Copy the files again from floppy.  
  52.     If they are still bad, rename the file, and the one immediately 
  53.     before the first bad file (bin01.23 if bin01.24 is bad) and
  54.     copy them again.  If they are still bad, download those files 
  55.     again from the distribution site (including the one before and 
  56.     after the bad one) and try again.  
  57.  
  58.     The reason for renaming the files is that sometimes, especially 
  59.     with drive that do not auto-magically record bad sectors, you
  60.     could copy a distribution file onto a bad spot on the disk.  If
  61.     this happens, you want to isolate the bad spot.  The easiest way
  62.     to do that is just leave the bad file on it.
  63.     
  64.     Keep trying, these same files have been used by literally 
  65.     thousands of people to install 386bsd.
  66.  
  67.     For those of you that have received your system on a CD-ROM,
  68.     you will need to find at least three things.  One is this file. 
  69.     Since you are reading it, I assume that you got it already. :-)  
  70.     If you can't read this file (you got it from the newsgroup, for 
  71.     example) there is one thing that you need to know so you don't 
  72.     look like a complete idiot on the net.
  73.  
  74.     There is no such thing as a Unix CD-ROM.  They are all in 
  75.     something called the ISO CD-ROM format.  You can read them as 
  76.     the D: drive in DOS, or mount them on your Sun or SVR4 system 
  77.     or whatever.
  78.  
  79.     Second, you will need to find the directory with the bootable
  80.     disk images in it.  They will have self explanatory names like:
  81.  
  82.     kerncopy.fs
  83.     base0-9.fs
  84.     fred.fs
  85.     genericaha.fs
  86.     boot-me-first.fs
  87.     this-is-the-file-with-the-fs-extension.fs
  88.  
  89.     You get the idea, right?  Look for the MS-DOS program
  90.     "RAWRITE.EXE".  It should be right near the file system (.fs) 
  91.     files.  Another clue for the truly lost will be that the file 
  92.     system files will all be 1.2 Meg big.  These files will fit 
  93.     onto either a 1.2Meg 5.25 inch diskette, or a 1.44Meg 2.5 inch 
  94.     diskette.  Use rawrite to write the fs files to diskettes and
  95.     boot from the diskettes.
  96.  
  97.     You did back your system up, right?
  98.     
  99.  
  100. 2.0.1    Boot disks  (versions and media formats)
  101.     
  102.     There is currently one official 386bsd 0.1 boot disk, referred 
  103.     to as the "Tiny" boot disk.  
  104.  
  105.     Because of the nature of the agreement between USL and
  106.     Berkeley, it is rapidly becoming impossible to get 386bsd 0.1
  107.     diskettes.  The archive at agate.berkeley.edu has been
  108.     eliminated completely.  The NetBSD archive that was there has
  109.     also been eliminated.
  110.  
  111.     There are a few FAQs from the boot/install disk.
  112.  
  113.  
  114. 2.0.1.1    Where does extract go when I reboot?
  115.     
  116.     It was in /tmp, which is cleaned the first time you reboot the 
  117.     system from the hard drive.  If you have just booted from the 
  118.     hard drive for the second time, chances are you just wiped out 
  119.     extract.  It is not really needed, since the instructions for 
  120.     building your own install are included in section 2.5.2 of 
  121.     the FAQ, under custom installation.
  122.  
  123.     When installing NetBSD, the set_tmp_dir and extract programs are 
  124.     part of the .profile that is booted when you are installing.  
  125.     This .profile is overwritten as part of the install process, and
  126.     extract then disappears.  If you need extract again, you can mount 
  127.     the install disk and source .profile.  This will recreate these 
  128.     two routines.
  129.  
  130.     There is also an install procedure that FreeBSD uses that does
  131.     the same job.  It is defined as part of the .profile on one of the
  132.     installation floppies.  You can either copy it from there, or use
  133.     the procedure for 'real disk partitioning'.
  134.  
  135.     
  136. 2.0.1.2    I put the floppy in and try to boot, and nothing happens.  What now?
  137.  
  138.     There are lots of possibilities.  We will start with the oldest 
  139.     (386bsd 0.1) problems.
  140.  
  141.     This is usually referred to as the Compaq boot problem.  The
  142.     easiest solution is to get a patched boot disk.
  143.  
  144.     Another source of possible hope for you is to grab the NetBSD
  145.     bootable disks.  They are compatible with 386BSD and allow you
  146.     to install on some of the more recalcitrant hardware.
  147.  
  148.     The FreeBSD install process is said to be better than the NetBSD
  149.     program for some machines.  Could be.  They are all available for
  150.     free from the net.  Try it.
  151.  
  152.  
  153. 2.0.1.3a    The floppy booted, but now the hard disk won't boot?
  154. 2.0.1.3b    I am trying to reinstall.  I run install and it loops
  155.           asking me if I want to use the whole disk?
  156.     
  157.     The most likely culprit is your hard disk controller.  It is 
  158.     probably doing some type of disk translation for you.  If this
  159.     is the case (assume it is) then you will need to find out the
  160.     real disk controller geometry, and rewrite your disk label.
  161.     See section 2.6.2, but before doing that get the program
  162.     pfdisk.exe.  This program will tell you what the controller 
  163.     geometry is (right before it reboots your computer).  Make the 
  164.     disklabel agree with this program and your system should boot.  
  165.     You may have to reinstall, but at least your disklabel will be 
  166.     right.  Note that this is a nearly required step for all NetBSD 
  167.     and FreeBSD installs.  You need to know what the disk geometry 
  168.     is before the BIOS messes with it.  If you start having these 
  169.     kinds of installation problems, I can virtually assure you that 
  170.     it is because your controller geometry and your disklabel 
  171.     geometry are different.
  172.  
  173.     NOTE:  If the hard disk controller does NOT have an option for
  174.     turning off the geometry, you may well be completely out of
  175.     luck.  There are very few controllers that fall into this
  176.     category.  The ones that do full time translation will often
  177.     boot up in translated mode.  pfdisk will help you determine the
  178.     correct geometry for your drive by telling you what the geometry
  179.     looks like when 386bsd boots up.  
  180.  
  181.     But on the other hand, maybe not...
  182.  
  183.     See section 2.5.5 below for a detailed set of instructions about
  184.     getting NetBSD (and by implication 386BSD and FreeBSD) to work with 
  185.     a system that uses full time translation.
  186.  
  187.  
  188. 2.0.1.4    What are the options on the boot prompt?
  189.  
  190.     The most amazing thing about the boot process in *BSD is the
  191.     boot up alternatives that are available.  There is little that
  192.     a person can NOT do from the boot prompt.  The boot diskette or
  193.     disk can be selected (fd(1,a) for fd1a (my B: drive is DOS))
  194.     can be the source of my kernel.  In addition, the name of the
  195.     kernel can be chosen (this allows you to boot with a test
  196.     kernel or reboot an older kernel if the new one gets hosed).
  197.     Finally, there are three choices for options that may or may
  198.     not work, depending on the age and proclivities of your boot
  199.     blocks.  These options are:
  200.  
  201.  
  202.         -s............... boot into single user mode
  203.         -a............... ask the user what device to use as root
  204.             just before mounting it (Not presently supported)
  205.         -d............... once you have the kernel loaded and
  206.             VM and such up and going, drop into the kernel 
  207.             debugger.  Great for debugging probe code.
  208.             ( not sure if this is presently working)
  209.  
  210. 2.0.1.5    I just used the '-s' option on the boot, but I can't write
  211.     anything onto the disk.  What is wrong.  If I use a plain 'mount'
  212.     command it tells me that my root file system is read-only.
  213.  
  214.     In single-user (system booted with -s or an error in one of 
  215.     the processes started by /etc/rc) the root filesystem mounts 
  216.     as read-only by default. This was intended so that some range 
  217.     of problems would not be made worse by writes to the disk.
  218.  
  219.     The 'dos' partitions mount as read-only in that there are 
  220.     reservations as to how well some of the FreeBSD tools work with 
  221.     the pcfs.  The same kind of reservations exist with NetBSD and 
  222.     the '-t msdosfs' option.  These options (-r for read-only, -w
  223.     for read-write) can be set in /etc/fstab.
  224.  
  225.     The status of both can be changed with 'mount -wu /{mount.dir}'
  226.     (where {mount-dir} is the name of the directory that the 
  227.     offending partition is mounted) to read-write.  Particularly for 
  228.     the dos filesystem, the man page for mount should be read in 
  229.     detail and the 'noexec' option examined.
  230.  
  231.     Note that mounting the file systems using the '-a' option will
  232.     mount all of the file systems that are normally mounted with
  233.     their usual read-write bits set normally.  Using this option
  234.     makes your root partition writable, and also mounts the rest of
  235.     the partitions in your /etc/fstab that are normally mounted
  236.     during boot-up.
  237.  
  238. 2.0.2    Fix-it boot disk 
  239.     
  240.     The fix-it disk contains a series of programs that are 
  241.     particularly handy for 'fixing' your disk in case you can't get 
  242.     logged in.  It includes the disklabel program and other utilities 
  243.     for system maintenance.
  244.  
  245.     For NetBSD and FreeBSD, you will probably have to build your own
  246.     Fixit disk.  You can mount the original file system floppy and
  247.     beat it to death if you want.  Put programs on it that you will 
  248.     need to build a new system.  As I think of them, I will put them 
  249.     in.
  250.  
  251. 2.1    Binary distribution
  252.  
  253.     The binary distribution 386bsd 0.1 consists of virtually all of 
  254.     the programs that a typical *nix system would be expected to have.  
  255.     The list includes mail, UUCP, GCC version 1.39, and others.
  256.     
  257.     Known problems with the binary distribution include the following:
  258.     
  259.     1.  Mtools as shipped in the bindist does not always work.  The 
  260.     ones on the install disk seem to work fine.
  261.     
  262.     2.  The install script built into the binary distribution does 
  263.     not correctly install all of the files and symbolic links that it 
  264.     should.  For example,  some of the symbolic links to the 
  265.     /usr/include directory are botched up.
  266.     
  267.     3.  'tip', the modem control program, does not always work right 
  268.     out of the box.
  269.     
  270.     4.  Any program that relies on a valid symbol table in the kernel 
  271.     (e.g. ps) will not work because the kernel is stripped so that it 
  272.     will fit onto the bootable disk.
  273.  
  274.     These problems are all cured either by patches available in the
  275.     patchkit, or through re-compilation.
  276.  
  277.     FreeBSD and NetBSD have solved these problems.  This information
  278.     is included primarily for those few people that get sucked into
  279.     using an old version of 386bsd for a class or something.
  280.  
  281.  
  282. 2.2    Source distribution
  283.  
  284.     The source distribution 386bsd 0.1 contains all of the source code 
  285.     for every program in the bindist.  Known problems (which are fixed 
  286.     in the patchkit) include the following:
  287.     
  288.     1.  There is an error message during install about install.src01 
  289.     not being found.  It is not an error, there isn't an install.src01.  
  290.     Think of it as Bill and Lynne's idea of a practical joke.
  291.     
  292.     2.  There are several symbolic links that are not made correctly.  
  293.     In addition, there are several files that should have been deleted 
  294.     (to ensure clean 'make's) before the files were packed.  This is 
  295.     fixed by the patchkit, as of 0.2.3.
  296.       
  297.     3.  The /usr/src tree does not compile cleanly.  This is fixed by 
  298.     the patchkit, as of 0.2.3, or by NetBSD or FreeBSD. 
  299.     
  300.  
  301. 2.3    Additional software distribution
  302.  
  303.     The etc distribution contains source trees for many programs that 
  304.     are of interest to 386bsd users.  The complete ISO software 
  305.     development environment, as well as many additional software 
  306.     packages (and all of the games) are included in this distribution.
  307.  
  308.     The most common problem with the etc distribution is the error 
  309.     "too many files open".  Followed closely by "install.etc01 not 
  310.     found".  The latter is a annoyance (see above) but the former can 
  311.     be easily overcome in a couple of ways.
  312.     
  313.     The "too many files open" is a result of the "cat" command leaving 
  314.     files open after it has read a file.   Dwight E. Cass (his Email 
  315.     address is dec@lazarus.nrtc.northrop.com) has provided us with this 
  316.     anecdotal work around for his own experiences:
  317.     
  318.     --------------------------------------------------------------------
  319.     So - back to installation.  This time, when I get to the etc01 
  320.     partition, I am a bit more awake, so I run it from Csh (with the 
  321.     open file limit at 256).  Works pretty well - but complains at the 
  322.     end that it could not do the final configuration because it could 
  323.     not find the configuration file - I checked the MANIFEST and the 
  324.     file is not there, so I finally decided to ignore the message (but 
  325.     it was bothersome!)  Once etc01 was done - source was easy ... and 
  326.     I am now up and running, and quite impressed!!!
  327.     --------------------------------------------------------------------
  328.     
  329.     Another method is to use a loop construct in the Bourne shell.  For 
  330.     example:
  331.     
  332.     for i in (etc01.*)
  333.     do
  334.       cat $i
  335.     done | compress -d | cpio -idalmu
  336.  
  337.     -or-
  338.     
  339.     for i in (etc01.*)
  340.     do
  341.       zcat $i
  342.     done | cpio -idalmu
  343.     
  344.     will also solve the problem handily.  This solution solves the problem
  345.     by running cat multiple times, with one file each.  Since cat now only
  346.     has one file, there are no limits on the number of files that can be
  347.     used for the distribution set.
  348.     
  349. 2.4    Patch-kit
  350.     
  351.     The patchkit has been completely deprecated.  FreeBSD and NetBSD
  352.     are both mature programs that will serve the average user extremely
  353.     well.  The patchkit may still be available, but it is only required
  354.     if you are installing the original 386BSD 0.1 version.
  355.  
  356.     There are two mailing lists dedicated to the patchkit.  They are as 
  357.     follows:
  358.  
  359.     386bsd-patchkit@cs.montana.edu, which is primarily for discussion of
  360.     up-coming patches and patchkit philosophy.
  361.     
  362.     patches@cs.montana.edu, which is dedicated to submitting new,
  363.     untested patches.
  364.     
  365.     The current (and final) version of the patchkit is 0.2.4, which 
  366.     has absolutely no relationship with the new version of 386bsd.  
  367.     It is available by anonymous FTP from several sites throughout 
  368.     the net.
  369.  
  370.  
  371. 2.5    Configuration
  372.  
  373.     By far, the most common configuration questions are partitioning, 
  374.     followed closely by all of the other software in the system.  
  375.     Sendmail and named are also problems occasionally, but the 
  376.     documentation that comes with them usually gets you through.  If 
  377.     you run into a problem, post a question to comp.os.386bsd.questions.  
  378.  
  379.     
  380.     A less frequently asked question is "Where can I get info on how 
  381.     to configure a kernel?"  The answer to this question has been 
  382.     provided by Richard Murphey (Email address rich@Rice.edu).  
  383.     
  384.     --------------------------------------------------------------------
  385.     Ready-to-print PostScript files for each section of the net2 system 
  386.     maintainer's manual are on nova.cc.purdue.edu in 
  387.     pub/386bsd/submissions/bsd.manuals.
  388.     
  389.     smm.02.config.ps.Z describes kernel configuration for the VAX, 
  390.     however some of it is relevant to 386BSD.  There is no freely 
  391.     available rewrite for 386BSD that I know of.  
  392.     --------------------------------------------------------------------
  393.  
  394.     Most of these manuals are now included in the standard release of
  395.     NetBSD and FreeBSD in the /usr/share/doc directories.
  396.  
  397. 2.5.1    Partitions
  398.  
  399.     This section describes many of the questions that people ask about 
  400.     hard disk partitioning.
  401.     
  402.     The first is a brief explanation of the BSD system disk partitions.
  403.  
  404. 2.5.1.1    What is a 'disklabel' and why do I need one?
  405.  
  406.     The BSD partition table supplements the DOS partition table.  The 
  407.     entries in this table are meaningful to BSD.  There are eight 
  408.     partitions in the BSD partition table, and they are normally 
  409.     lettered from a: to h:.  This supplemental partition table is
  410.     often refered to as the 'disklabel'.
  411.  
  412.     This tutorial is provided by by "<haley@husc.harvard.edu>" and 
  413.     provides an  excellent overview of the hard disk partitioning 
  414.     procedure from start to finish.
  415.  
  416.         "Disk Partitioning for the Compleat Idiot"
  417.  
  418.     There are times, in our trials with our computers, that it becomes
  419.     necessary to mess about with the disklabel. For those not
  420.     knowledgeable of BSD or Unix Systems administration, this somewhat
  421.     simple task can be somewhat daunting. This document is the result of
  422.     my own short experience.
  423.  
  424.     This does not cover physical installation of the disk. For those who
  425.     are having trouble with that, I direct you to any of the fine manuals
  426.     dealing with hard drives and your hardware.
  427.  
  428.     It also does not deal with the vagaries of the DOS partition manager.
  429.     It assumes you have done that as well, if need be...
  430.  
  431.     After the drive is physically installed and is recognized in the BSD
  432.     startup, and it mentions both your drives, in the order you expect
  433.     them... Or perhaps just the one, if you had special problems with
  434.     installation. Now all you have to do is "disklabel" the drive... Well,
  435.     what is *THAT*??? 
  436.  
  437.     The disklabel is used by the kernel and other utilities to tell how
  438.     you want or have the drive set up *logically*. 
  439.  
  440.     In a beautiful world, we might have a very free hand at this set-up
  441.     and expect it to work. Unfortunately, the authors of the software
  442.     dealing with the hard drives either decided or were forced by
  443.     circumstance to make certain things about the disklabel inviolate. 
  444.     
  445.     When you let the installation disk set the disklabel for you first
  446.     drive it comes out like this:
  447.  
  448.         The a: partition is the primary partition.
  449.         The b: partition is the swap partition.
  450.         The c: partition is the amount of the disk used by 386bsd 
  451.             (swap and data)
  452.         The d: partition is the entire disk.
  453.  
  454.     Of these, the only one that could be different is a:... 
  455.  
  456.     (Note for those of us who have spent far too much time using DOS: the
  457.     labels a: b: c: d: e: f: g: h: DO NOT refer to DOS drives, but to
  458.     partitions in your 386bsd partition... confusing, eh?  For the sake 
  459.     of consistency I will never make a reference to DOS drives except by
  460.     saying something like "DOS drive C:". )
  461.  
  462.     It's possible to divide up the disk a bit differently, but three
  463.     things MUST be:
  464.  
  465.     c: must refer to every cylinder you wish 386bsd to use, either
  466.     for your data or the swap space. 
  467.  
  468.     d: Must refer to the whole disk, from cylinder 0 to the last
  469.     one...
  470.     
  471.     b: Must always refer to a swap partition. Note that on any
  472.     other than the first disk it does not have to, but if you
  473.     enable swapping on that drive, and you are using b: for
  474.     something else, that something else will be killed.
  475.  
  476.     The reason for this is simple: It's hard coded in.
  477.  
  478.     "WHY?" you ask? (I did...) Probably time constraints, maybe tradition.
  479.     But if you look at the code in "isofs" and "ufs" in your sys.386bsd
  480.     directory, you will see numerous comments asking some of the same
  481.     questions, which leads me to believe this may change in the future,
  482.     making our lives both more complicated and easier at the same time...
  483.  
  484.     Getting past the esoteric explanations, here is a method for figuring
  485.     out and "labeling" your disk.
  486.  
  487.     We'll start with the disklabel from my second disk, in the form most
  488.     understandable by humans... #'s signify the start of a comment.
  489.  
  490.     # /dev/rwd1d:
  491.     type: ESDI
  492.     disk: maxtor7245
  493.     label: 
  494.     flags:
  495.     bytes/sector: 512
  496.     sectors/track: 31
  497.     tracks/cylinder: 16
  498.     sectors/cylinder: 496
  499.     cylinders: 967
  500.     rpm: 3600
  501.     interleave: 1
  502.     trackskew: 0
  503.     cylinderskew: 0
  504.     headswitch: 0        # milliseconds
  505.     track-to-track seek: 0    # milliseconds
  506.     drivedata: 0 
  507.     
  508.     5 partitions:
  509.     #      size  offset  fstype [fsize bsize   cpg]
  510.       a:   198400       0  4.2BSD    512  4096    16     # (Cyl.    0 - 399)
  511.       b:    31744  447392    swap                      # (Cyl.  902 - 965)
  512.       c:   479136       0  unused      0     0           # (Cyl.    0 - 965)
  513.       d:   479136       0  unused      0     0           # (Cyl.    0 - 965)
  514.       e:   248992  198400  4.2BSD    512  4096    16    # (Cyl.  400 - 901)
  515.     
  516.     Some math:
  517.     Looking at the comments at the end and the size and offset columns,
  518.     size is a function of (last - first + 1) * sectors per cylinder:
  519.     a: 399 - 0 + 1 = 400 * 496 = 198400
  520.     b: 965 - 902 + 1 = 64 * 496 = 31744
  521.     c: & d: (Since I have no DOS partition, whatsoever)
  522.           965 - 0 = 1 = 966 * 496 = 479136
  523.     e: 901 - 400 = 502 * 496 = 248992
  524.     
  525.     248992 + 198400 + 31744 = 479136 (all the parts should equal the whole)
  526.     
  527.     Some things I discovered  (for all you in novice land like me...)
  528.     
  529.     1. As you can see this disk has 967 cylinders, but I only refer to 966
  530.     of them, 0 - 965... This is because it's good practice to leave the
  531.     "Landing Zone" cylinder out of it... This is usually the last
  532.     cylinder, and it's where the read/write heads hang out when your disk
  533.     is off...
  534.  
  535.     Note from TSgt Dave:
  536.  
  537.     Most modern drive heads come to rest on a polished surface inside the 
  538.     highest cylinder.  I could be mistaken, of course, and the Hard Drive 
  539.     Bible (or other appropriate reference manual) will tell the tale for 
  540.     each drive.
  541.  
  542.     2. a: can be a regular partition, b: should be swap, c: everything
  543.     386bsd will get to use, including swap. d: is the entire disk from 
  544.     0 - (cylinder_per_disk - 2)   [leaving out the Landing Zone]
  545.  
  546.     On the boot drive (The drive that actually contains the kernel), a: 
  547.     is the boot partition.  On all other drives, it is a regular partition.
  548.  
  549.     You can then use e - h for your other partitions. I am not sure
  550.     whether you could specify b: as other than a swap partition and not
  551.     run into trouble, but you could surely make it a zero sized one
  552.     starting and stopping on the Landing Zone...
  553.  
  554.     Note from TSgt Dave:
  555.  
  556.     This is a good idea.  Another way to accomplish this is to
  557.     simply not specify it in the map.
  558.  
  559.     3. Stupid human trick: When doing the math don't forget that 400 - 900
  560.     refers to 50*1* cylinders. I did, for a while. No great problem I
  561.     suspect, but why waste a cylinder...
  562.  
  563.     4. newfs'ing really is that simple if you have the label right:
  564.     "newfs /dev/rwd?x config_template" where the question mark is the 
  565.     physical disk, the x is a partition letter, and the config_template 
  566.     is the configuration from /etc/disktab for your disk drive. 
  567.  
  568.     * NOTE:  This is a thumbnail sketch; read the man page to verify all 
  569.     of the options and be sure about how to proceed...
  570.     
  571.     5. then fsck the partition: 
  572.     fsck /dev/rwd?x 
  573.     
  574.     Don't forget that fsck should be run on the RAW device.
  575.  
  576.     6. As long as it checks out, you can then mount it and do disk things
  577.     with it...
  578.  
  579.     7. Add it to the fstab... (follow the man page).  Don't forget 
  580.     that your new swap partition won't work if your kernel isn't 
  581.     configured for it, but it won't cause you any problem to have 
  582.     it there. 
  583.  
  584.     One last note from TSgt Dave:
  585.  
  586.     And I have yet to figure out a way to determine if it is or
  587.     isn't using the swap partition anyway.  There is a program called
  588.     'swapinfo' and it is part of the NetBSD source tree.  On my system, 
  589.     it tells me that I never use the swap area. :)
  590.  
  591.     Comnonly used definitions:
  592.  
  593.     bsize:
  594.     Block Size:  This is the smallest allocatable area on a disk file 
  595.     system, sort of.  A file uses the maximum amount of blocks until it
  596.     can not completely fill up a block. 
  597.  
  598.     fsize:
  599.     Fragment Size:  This is the size of the 'leftover' data that didn't
  600.     fit into a full block.  For example, assuming a using an 8K Block
  601.     Size/1K Fragment Size, a 34.5K file, would use up 4-8K Blocks (4 *
  602.     8K = 32K) and 3 1K fragments (3 * 1K = 3K).  There is 512 bytes of
  603.     wasted space, since 32K + 3K = 35K, which is 512 bytes larger than
  604.     34.5K.  If you want to reduce the amount of wasted space, you can
  605.     reduce your fragment size, but you also reduce the amount of data
  606.     you read at one time, so your disk performance decreases also.
  607.     A good setup is 8K/1K for performance, but if you are really
  608.     concerned about wasted space you can consider using a 4K/512byte
  609.     filesystem.
  610.  
  611.     For further information, find an article that explains the Berkeley
  612.     FFS in more detail.
  613.  
  614.     cpg:
  615.     Cylinders Per Group, it determines the cylinder group size, which 
  616.     in turn determines the number and location of the alternate 
  617.     superblocks.
  618.  
  619.  
  620.     Cgd posted a description of how to manually install 386bsd and 
  621.     create 'real' BSD partitions.  It is excerpted below:
  622.     
  623.     --------------------------------------------------------------------
  624.     HOW TO GET 386bsd 0.1 INSTALLED WITH "REAL" PARTITIONING:
  625.     
  626.     (remember, if things don't work, they might be in places that aren't 
  627.     normally looked in... things should work as below, but you might 
  628.     have to use explicit paths occasionally... the 'better' stuff -- 
  629.     mount, umount, cp, etc... is in /usr/distbin on the fixit floppy...  
  630.     even mknod is there, if the devices you need aren't on the fixit 
  631.     floppy...) 
  632.  
  633.     (1) boot the fixit floppy
  634.     (2) disklabel the disk as appropriate
  635.     (3) newfs the partitions
  636.     (4) mount the new root partition under /mnt
  637.     (5) mkdir /mnt/usr
  638.     (6) mount the new /usr partition under /mnt/usr
  639.  
  640.     (7) cpio the entire contents of the fixit floppy to the hard drive
  641.         cd /
  642.         ls .profile * [0-ln-z]*/* */*/* | cpio -pdalmu /mnt
  643.         (NOTE: [0-ln-z]*/* is to avoid matching mnt/mnt)
  644.     (8) copy /usr/distbin/mount and /usr/distbin/umount to /mnt (so that
  645.         they'll be in the new root partition, so you can mount the
  646.         new /usr partition...)
  647.     (9) shutdown
  648.         and the eject the floppy.
  649.     (10) reboot off the hard drive, then fsck -p <root raw device>
  650.         If there are any errors, after the fsck is done, hit
  651.         ctl-alt-delete, and repeat this step.
  652.     (11) fsck -p <usr raw device>
  653.     (12) mount -u <root device> /
  654.     (13) mount <usr device> /usr
  655.     (14) insert 0.1 boot/install floppy (dist.fs) into floppy drive
  656.         and "mount /dev/fd0a /mnt"
  657.     (15) cd /mnt
  658.         and then
  659.         usr/bin/zcat etc/baselist.Z | usr/bin/cpio -pdalmu /
  660.     (16) cd /
  661.         and then
  662.     /mnt/usr/bin/zcat /mnt/etc/baseutils.cpio.Z | /mnt/usr/bin/cpio -idalmu
  663.     (17) umount /mnt    then eject the floppy
  664.     (18) umount /usr
  665.     (19) shutdown
  666.     (20) reboot off the hard drive, and get all of the various files (the
  667.         bindist files, srcdist files, etc...).
  668.         I put them into /usr/tmp, because there wasn't enough space
  669.         in /tmp (because it was on a small root partition...).
  670.     (21) cd / ; cat <all the binary files> | uncompress | cpio -idalmu
  671.     (22) rm <all the binary files>
  672.     (23) put your hostname into "/etc/myname" and put your ip addr/hostname
  673.         into /etc/hosts.
  674.     (24) make an fstab for yourself.  specifically, you want something like:
  675.         <root device name>    /    ufs rw 1 1
  676.         <usr device name>    /usr    ufs rw 1 2
  677.     
  678.     congratulations!  you now have a working system!
  679.     
  680.     you can repeat step 21 for the srcdist and etcdist files, as well, 
  681.     if you wish...
  682.  
  683.  
  684. 2.5.2    Common Disk Label Problems.
  685. 2.5.2.1    Swap space.
  686.  
  687.     Nate Williams provides a short tutorial on swap space in 386bsd, 
  688.     excerpted below:
  689.     
  690.     To be able to use additional swap partitions, you need to specify 
  691.     them in the config (/sys/i386/conf/WHATEVER) file.
  692.     
  693.     Ex:
  694.     
  695.     config          "386bsd"        root on sd0 swap on sd0 and sd1
  696.     
  697.     Allows swap on sd0 and sd1
  698.     
  699.     config          "386bsd"        root on wd0 swap on wd0 and sd0
  700.     
  701.     This would allow swap on both wd0 and sd0 OR whichever (both/either) 
  702.     of the two had a valid disklabel.  Note, you can really screw 
  703.     yourself up with this, if you should happen to not want to swap to 
  704.     this partition, and it happens to be the first one found...
  705.     
  706.     The problem of not being able to swap was from the config file not 
  707.     having wd1 in it.
  708.     
  709.     controller      wd0     at isa? port "IO_WD1" bio irq 14 vector wdintr
  710.     disk            wd0     at wd0 drive 0
  711.     disk            wd0     at wd0 drive 1
  712.                     ^^^                  
  713.     This should have been wd1, and that's why it didn't get added by 
  714.     default.  I may be wrong, but I have swapped to two different 
  715.     partitions w/out any problems since patchkit 0.1, and there aren't 
  716.     any patches to swap386bsd.c
  717.        
  718.     Once the install is complete, swapping will not be enabled on the 
  719.     second drive.  The following steps can be used to make sure that it 
  720.     is enabled correctly.
  721.     
  722.     If there is a 'b' partition in your root disk 386bsd partition, it 
  723.     will be used automatically (MAKE SURE B is not the start of the 
  724.     disk, and MAKE SURE b doesn't contain any data you wish to keep).  
  725.     If b starts at disk offset 0, it will promptly wipe out your boot 
  726.     sectors and other important disk stuff.  (This appears to be fixed
  727.     in the current NetBSD sources)
  728.     
  729.     If you want an additional partition, put an entry similar to this 
  730.     in /etc/fstab:
  731.     
  732.     /dev/sd1b    none            swap        sw
  733.     
  734.     I'm swapping on sd0b and sd1b, and 'swapon' is run on this partition 
  735.     on boot up.
  736.     
  737.     Swapping to a file is still not implemented.  Rumor has it 0.2 will 
  738.     have such things.  If someone wanted to add it, the vnops_* files 
  739.     would have to be radically modified to get it to work correctly.
  740.  
  741.  
  742. 2.5.2.2    Increasing the 386bsd partition size.
  743.  
  744.     Once the install is finished, the system has it's 386bsd partition.
  745.     This includes a 5Meg swap partition, which is altogether too small.  
  746.     There is no easy way to increase this swap partition without 
  747.     relabeling the drive.   Unfortunately, relabeling usually involves 
  748.     reinstalling.  That involves re-doing just about everything you have 
  749.     just finished doing.  The good news is that if all you have done is 
  750.     the base installation, you don't have a lot of time and energy 
  751.     invested in the system.  Take the time, and make sure that your swap 
  752.     space is at least as big as your memory; many people recommend even
  753.     larger.  There is no real limit to the size that this space can
  754.     take.  If you have two disk drives, you can have space space on both.
  755.     Simply follow the instructions above, and you will be all set.
  756.     If your swap space is smaller than your real memory, system core 
  757.     dumps will be disabled.
  758.  
  759.  
  760. 2.5.2.3    I can access the DOS partition on my second disk from Unix but not 
  761.     DOS?  Any suggestions?
  762.  
  763.     One kinky problem that almost got me was when I tried to disklabel 
  764.     my second drive in order to use the DOS partition on it, and use 
  765.     the rest as swap for BSD (FreeBSD-1.0 Eps, SCSI drive on an 
  766.     AHA1542B, to be exact). The DOS partition was visible from UNIX, 
  767.     but *not* from DOS.
  768.  
  769.     What I tried to do:
  770.         Using PFDISK (from DOS), make one big DOS partition at the start 
  771.         and use the rest for a BSD partition (type 165).  Something that 
  772.         came out like
  773.           1    6    0    69 DOSbi # ..
  774.           2    165  70    98 unkno
  775.         for a 99 cyl drive.
  776.  
  777.     
  778.         Using BSD disklabel generate disk description/label as documented 
  779.         in the FAQ. Make only 'c' (total BSD DOS part), 'd' (complete disk) 
  780.         and 'b' (intended swap) BSD partitions.
  781.  
  782.     Problem:
  783.         When writing the label, disklabel would ask about overwriting DOS
  784.         partition table.  Whether I said y or n, the DOS partition table
  785.         was screwed up, as seen from DOS (BSD saw the DOS file system
  786.         very nicely indeed).
  787.  
  788.     Cause, solution:
  789.         BSD disklabel wants to write the label to the start of the 'a' 
  790.         partition; I had *not* defined an 'a' partition (since I was 
  791.         only using the disk for swap).  This tells disklabel that the 'a'
  792.         partition is the start of the disk, which means there is no DOS
  793.         partition.  Disklabel then writes the label at the start of the 
  794.         drive, which is why it talks about overwriting (aha!); this is 
  795.         *bad* for the DOS partition table.  One solution is to have a 
  796.         non-empty (e.g. one cylinder) 'a' partition at the start of the 
  797.         BSD part of the disk, and resize the 'b' swap partition 
  798.         accordingly.  Now everything works just fine.  Note that
  799.         this solution can be used whenever you want the DOS
  800.         partition table to be safe and the DOS partition to be
  801.         mountable.
  802.  
  803.         One other fly in this ointment.  The disklabel program has 
  804.         historically asked "Overwrite disk with DOS-partition [n]: "
  805.         then the normal inclination is to believe the prompt and
  806.         press return for 'no'.  The default answer may or may not be
  807.         'no'.  There are several versions of disklabel where the
  808.         default answer is actually 'yes' even though the prompt
  809.         implies that you can press return and get 'no'.  In this case,
  810.         it might be best to assume that the default answer doesn't 
  811.         exist until you have had a chance to actually look at the
  812.         disklabel code.
  813.  
  814.  
  815. 2.5.3    How do I set up the system so that I can boot from more than one
  816.     operating system/file-loader without using floppies?
  817.     
  818.     There are many people that wish to be able to boot DOS or 386bsd 
  819.     at will.  There are several programs that allow this.  The 
  820.     program "os-bs" is one such program, "BOOTEASY" is another, and 
  821.     there are three or four others.  There are problems in some 
  822.     configurations using the os/2 boot manager for this, so beware.  
  823.     
  824.     In addition to being able to boot from either of two partitions, 
  825.     some people want to operate more than one disk drive (and perhaps 
  826.     boot from either as well).  Christoph Robitschko provided one 
  827.     description of this.  Since there are virtually limitless 
  828.     possibilities for configurations for BSD systems, it will be 
  829.     impossible to answer all of the possible questions about these 
  830.     features.  Many people operate with multiple disk drives on one 
  831.     or more controllers.  
  832.  
  833.     Yu-Han Ting provides this tutorial on partitioning and booting
  834.     multiple systems with a single hard disk.
  835.  
  836.     After spending one day fighting with the nasty partition table, 
  837.     finally I had NetBSD, DOS 5 (Sorry, I don't use DOS 6), and 
  838.     OS/2 2.1 March beta co-existing on my hard drive.  Here is the 
  839.     answer:
  840.  
  841.     Since that my original hard disk setup was corrupted by NetBSD's
  842.     installation program, I decided to rebuild it.  I would like my 
  843.     partition table looks like this:
  844.  
  845.     Partition 0: OS/2 2.1 beta (Primary, HPFS, C:)
  846.     Partition 1: MS-DOS 5.0 (Primary, C:)
  847.     Partition 2: MS-DOS 5.0 (Extended, D: & E:)
  848.     Partition 3: NetBSD
  849.  
  850.     You will need the following tools before you can setup a similar 
  851.     environment:
  852.  
  853.     1) Mr. Wolfram's OS-BS.  (It's an excellent boot selector, much
  854.        better than OS/2's boot manager, IMHO)
  855.     2) PFDISK.EXE.  (It's available from wuarchive.wustl.edu:mirrors/
  856.        linux/dos_utils/pfdisktc.zip.)
  857.     3) A binary editor.  I use Norton Utilities' DiskEdit.
  858.     4) 386BSD's 'tinyBSD' distribution disk.
  859.  
  860.     After you have the necessary tools handy: 
  861.  
  862.     1) Use OS/2 'fdisk' to create partition 0.  Make it install-able 
  863.        and install the system as usual.
  864.     2) Use OS/2 'fdisk' to create partition 1.  Assign drive C: to 
  865.        the partition.  Then reboot from DOS.
  866.     3) Use DOS 'fdisk' to create the extended partition.  Assign logical
  867.        drive D and E to the partition.
  868.     4) Reboot from DOS again.  Format drive C: (for DOS), D:, and E:.
  869.     5) Use 'tinyBSD', NOT 'NetBSD', to boot the machine.  Create a genuine
  870.        386BSD partition.  Once the 386BSD partition has been made,
  871.        boot DOS from floppy and execute PFDISK.EXE.  For example, issue
  872.        the following commands once you get into DOS:
  873.  
  874.         C>pfdisk 0 <enter>
  875.         pfdisk> L <enter>  ("pfdisk>" is the command prompt and "L"
  876.                     is the actual command.)
  877.  
  878.        The second line, i.e., command 'L', will tell you the starting
  879.        address and the length of each partition you have.  Record the
  880.        information for step 6.
  881.     6) Reboot NetBSD from floppy.  Install NetBSD over the original
  882.        386BSD partition.  Fill out the information you get from step
  883.        5 to the installation program.  'halt' the system after you
  884.        have installed 'install2.fs'.
  885.        (Ed.Note:  This step is the same for 386bsd or NetBSD)
  886.     7) Boot OS/2 from floppy.  Use fdisk to assign drive C: to the OS/2
  887.        partition.  In my case, partition 0.  Note that fdisk will
  888.        change the ID of partition 1 from '0x06' to '0x16'.  '0x06'
  889.        stands for 16-bit DOS FAT; while '0x16' stands for non-DOS
  890.        partition.  In the next step, we have to change '0x16' back to
  891.        '0x06' manually.  You can get the ID information by issuing "I"
  892.        under PFDISK.  It will tell you what the IDs represent.
  893.     8) Boot DOS from floppy.  Use the binary editor to change the
  894.        partition type as stated in step 7.
  895.     9) Install OS-BS under DOS.  Remember to enable "Modify startup ID
  896.        before booting".
  897.     10) Now you can boot any partition w/o floppy diskettes during
  898.         startup. :)
  899.  
  900.     The above procedures may not be optimized.  But it works for me.  
  901.     I won't spend anytime to deal with tedious work again :)
  902.  
  903.     You might feel strange why we need 'tinyBSD'.  Simply trust me.  
  904.     By using 'tinyBSD' to create a partition for NetBSD, it will 
  905.     make your life a lot easier.  Hope this helps.  
  906.  
  907.     Ed. Note:  The reason is because several versions of NetBSD and 
  908.     FreeBSD will not label a disk that doesn't have a disklabel.  
  909.     Catch-22.
  910.  
  911.  
  912.     PS:  %%%%% REMEMBER TO BACKUP YOUR SYSTEM BEFORE YOU CONDUCT THE 
  913.             EXPERIMENT !!! %%%%%
  914.  
  915.     Here is Christoph's explanation of how to set up a dual hard drive
  916.     system so that the 386BSD/NetBSD system is stored entirely on the
  917.     second hard drive.
  918.  
  919.     I have done this with two IDE drives. IDE+SCSI should be a bit 
  920.     simpler.  There's a boot selector called BOOTEASY that can load 
  921.     from the second drive (you can get it from 
  922.     ftp.tu-graz.ac.at:pub/386BSD/0.1/unofficial/booteasy).
  923.  
  924.     What I have done to boot 386bsd from the second (IDE) drive:
  925.  
  926.     - installed booteasy on the first drive
  927.     - (you can install booteasy on the second drive, too, if you
  928.       have multiple partitions there)
  929.     - modified Julian's boot blocks to use the second drive per default
  930.       (Ed. Note:  See below for the illumination of this step)
  931.     - rebuilt the kernel to have root and swap on wd1 (probably not
  932.       necessary for you, since your second disk is sd0, which is
  933.       already in the config file).
  934.  
  935.     It worked perfectly for me.
  936.  
  937.     This should also work with equal facility for 386bsd users.
  938.  
  939.     Julian Elischer (julian@jules.dialix.oz.au) adds:
  940.  
  941.     To make the bootcode default to drive 1 look in 
  942.     /sys/{arch/}i386/boot/boot.c for the following (or similar.. It has 
  943.     changed a little) code:
  944.  
  945. loadstart:
  946.  
  947.     /***************************************************************\
  948.         * As a default set it to the first partition of the first    *
  949.         * floppy or hard drive                        *
  950.       \***************************************************************/
  951.         part = unit = 0;
  952.         maj = (drive&0x80 ? 0 : 2);             /* a good first bet */
  953.         name = names[currname++];
  954.  
  955.  
  956.     and change it to:
  957.  
  958.  
  959. loadstart:
  960.  
  961.     /***************************************************************\
  962.     * As a default set it to the first partition of the SECOND    *
  963.     * floppy or hard drive                        *
  964.     \***************************************************************/
  965. !    part = 0;
  966. !    unit = 1;
  967.     maj = (drive&0x80 ? 0 : 2);             /* a good first bet */
  968.     name = names[currname++];
  969.  
  970.     And in yet another interation, Luke Mewburn (lm@yallara.cs.rmit.oz.au)
  971.     decided to hack that a bit further in his NetBSD 0.9 (as_shipped i.e., 
  972.     non-current) to set the drive to the unit which the boot blocks 
  973.     loaded off.
  974.  
  975.     So, instead of:
  976.         part = unit = 0;
  977.     do:
  978.         part = 0;
  979.         unit = (drive & 0x7F);
  980.  
  981.     (the FAQ suggests `part = 0; unit = 1;' )
  982.  
  983.         This way, whatever drive the bb's loaded from, it has that as
  984.     default.  In my case, I get wd(0,a) when I have my netbsd drive as
  985.     C:, and wd(1,a) when I have it as D:.  (I've been swapping drives
  986.     left right and centre the last day getting dos to boot on one drive
  987.     and netbsd on another).
  988.  
  989.  
  990. 2.5.4    How do I disklabel my second hard drive?
  991.  
  992.     The obvious answer is to use 'disklabel -w -r /dev/rwd1d'.  
  993.     Unfortunately, this does not always put a real disklabel on the
  994.     drive.  The symptom is that the drive labels and can be used
  995.     until the system is reset, at which point the system tries to
  996.     read the label from the disk.  It was never actually written to 
  997.     the disk, so the operation fails.
  998.  
  999.     There are also reports that the /usr/mdec files are corrupted in 
  1000.     some of the distributions.  If you have tried everything else, you
  1001.     can either load the files from one of the many archive sites that
  1002.     keep the /usr/mdec files around, or you can recompile them 
  1003.     yourself.
  1004.  
  1005.     Mark Weaver (mhw@cs.brown.edu) provides us with an illuminating
  1006.     answer to this perplexing problem.
  1007.  
  1008.     I had the same problem and there is a simple solution.  I'm not 
  1009.     sure why this works, but it does.
  1010.  
  1011.     Instead of specifying the entire device path name (i.e. /dev/rsd0c), 
  1012.     only specify the two letters of the device type and the unit number 
  1013.     (i.e. "sd0").  Disklabel figures out the rest, and it works.
  1014.  
  1015.     For instance, the following line works for me:
  1016.  
  1017.       disklabel -w -r sd0 <drive-type>
  1018.  
  1019.     assuming of course that the boot block files are in /usr/mdec/ and
  1020.     the <drive-type> is in the /etc/disktab.
  1021.  
  1022.     This is also a symptom of some of the versions of FreeBSD and 
  1023.     NetBSD where the disklabel code was 'fixed' to only write a 
  1024.     disklabel on a drive with a disklabel.  Oops.
  1025.  
  1026.     Also, some folks want to mix SCSI and IDE drive together in the
  1027.     same system.
  1028.  
  1029.     A report about someone with an Austin Tower (486DX/50), AMI BIOS, 
  1030.     Caviar 2250 IDE, Adaptec 1542CF, and Toshiba SCSI disk (1.2GB)
  1031.     posted this set of instructions:
  1032.  
  1033.     The BIOS is configured to boot from the IDE drive as type 47 
  1034.     (user defined).  The IDE drive currently has NetBSD 1.0 BETA on it.
  1035.  
  1036.     The 1542CF switches are 1-4 off (open), 5-8 on.  The meaning is as 
  1037.     follows:
  1038.  
  1039.         1(off)=Termination software controlled.
  1040.         2,3,4(off)=I/O Port x330.
  1041.         5(on)=disable floppy.  I use the Austin floppy controller.
  1042.         6,7,8(on)=disable Adaptec BIOS.
  1043.  
  1044.     Note that this means the Adaptec 1542CF on-board setup program is 
  1045.     also disabled.  If I need to change my SCSI termination, I first 
  1046.     have to enable the Adapted BIOS (sw 6,7,8), enter 1542CF setup 
  1047.     and change termination, then change switches again.  
  1048.  
  1049.     I could not configure the system to boot from the SCSI drive having 
  1050.     the IDE as a secondary drive.
  1051.  
  1052.     (Ed Note: There is more news on this front all of the time.  
  1053.     Since I personally don't have much interest in doing this (I 
  1054.     boot from my IDE drives and mount my SCSI drives) I don't see 
  1055.     the problem. )
  1056.  
  1057.  
  1058. 2.5.5    386bsd/NetBSD/FreeBSD cannot handle disk geometry translations, 
  1059.     but it turns out that my disk geometry is translated.  It has 
  1060.     five zones, each with a different sec/track!  What kind of 
  1061.     things can I do about the disk translation my hard disk 
  1062.     controller uses?
  1063.  
  1064.     It turns out that what *BSD cannot handle is not translation, but
  1065.     translation that changes during the boot-up process.  For example,
  1066.     the configuration above will work just fine IF the translation
  1067.     that the controller uses when it powers up is the same one that it
  1068.     uses when it boots.  On many PC clones, the BIOS loads a different
  1069.     geometry after it boots to make the geometry agree with one that is
  1070.     loaded in CMOS.  This is the fatal flaw for *BSD.  Fortunately, 
  1071.     once the problem has been identified, it is relatively easy to
  1072.     handle.  Simply make sure that the BIOS is configured to set the
  1073.     controller to the translated geometry that the card powers up 
  1074.     with.
  1075.     
  1076.     There are several ways to get around these problems with disk 
  1077.     geometry translation.  If you are using a SCSI controller, you can
  1078.     specify the geometry such that each 'cylinder' is 1 Meg (64 sectors
  1079.     by 32 tracks for example).  Most SCSI controllers will blithely
  1080.     ignore what YOU tell it the geometry is and press on using this
  1081.     type of 1 Meg cylinder had to get the job done.  NOTE:  If you are
  1082.     going to try this, try to ensure that each 'pseudo cylinder' is a
  1083.     reasonable size (like 1Meg or 512K).
  1084.  
  1085.     An interesting method for dealing with disk geometry comes from 
  1086.     Alan Barrett (barrett@lucy.ee.und.ac.za):
  1087.  
  1088.     This sort of problem happens when you try to install NetBSD in a
  1089.     partition of a disk whose controller does geometry translation.  I
  1090.     have not had time to find the bug that causes the problem.  One 
  1091.     option is to disable the geometry translation:  Use ide_conf to 
  1092.     find the true geometry, use the CMOS setup program to tell your 
  1093.     BIOS about the true geometry, and reformat everything.  I 
  1094.     successfully did that on one of my systems.
  1095.     
  1096.     If you are not able to, or do not wish to, disable the geometry
  1097.     translation then the following work-around might work for you.  
  1098.     This requires that the disk have unused space on {cylinder 0, 
  1099.     head 0}, from sector 2 to sector 16.  Almost all DOS disks that 
  1100.     I have ever seen satisfy this condition, because they usually 
  1101.     start the DOS partition in {cylinder 0, head 0, sector 1}, 
  1102.     leaving most of {cylinder 0, head 0} unused apart from the 
  1103.     partition sector in {cylinder 0, head 0, sector 1}.  However, 
  1104.     many partitioning programs like to hide this fact from you, 
  1105.     and pretend that the DOS partition starts at the front of the 
  1106.     disk; don't believe them until you have checked with a raw 
  1107.     disk editor.
  1108.  
  1109.         0.  Make sure you have adequate backups.
  1110.  
  1111.         1.  Use a partition sector editor (fdisk, pfdisk, os-bs, 
  1112.             booteasy, Norton utilities, whatever) to mark the partition 
  1113.             that you want for NetBSD as bootable with type 0xA5 
  1114.             (decimal 165).
  1115.  
  1116.         2.  Halt the system.  Boot the NetBSD kernel copy floppy.  
  1117.         When it asks you to insert the floppy for the root file 
  1118.         system, switch to the Install-1 floppy and press enter.
  1119.  
  1120.         3.  Answer all the installation prompts, using numbers based 
  1121.         on the translated geometry.  When it asks if you really 
  1122.         want to label the disk, be brave and say yes.
  1123.  
  1124.         4.  Halt the system.  Boot to DOS.  Run a disk editor program, 
  1125.         such as Norton utilities.
  1126.  
  1127.         5.1.  Verify that the partition sector in {cyl 0, head 0, 
  1128.         sec 1} is undamaged.  Verify that the disklabel program 
  1129.         run as part of the NetBSD install has written the NetBSD 
  1130.         primary boot block to {cylinder xx, head 0, sector 1}, 
  1131.         written the disk label to {cyl xx, head 0, sec 2}, and 
  1132.         written the secondary boot program to {cyl xx, head 0, 
  1133.         sectors 3 to 16}.  ("xx" represents the translated 
  1134.         cylinder number you chose for the start of the NetBSD 
  1135.         partition.  You did choose to start on a cylinder boundary, 
  1136.         I hope.)
  1137.  
  1138.         5.2.  Verify that the space in {cyl 0, head 0, sectors 2 to 
  1139.         16} is still available.  Copy the fifteen sectors containing 
  1140.         the NetBSD disk label and secondary boot block from {cyl 
  1141.         xx, head 0, sectors 2 to 16} to {cyl 0, head 0, sectors 2 
  1142.         to 16}.
  1143.  
  1144.         5.3.  Edit the partition table in {cyl 0, head 0, sec 1}.  
  1145.         Change the system ID of the NetBSD partition from 0xA5 
  1146.         (decimal 165) to something else (I use 0xA4, decimal 164), 
  1147.         but keep it flagged as bootable.  This will let you boot 
  1148.         to the NetBSD primary boot block.
  1149.  
  1150.         5.4.  Edit one of the previously unused partition table entries 
  1151.         (I hope you have one), to contain the following information: 
  1152.         {sys id = 0xA5, boot flag = 0, start cylinder/head/sector = 
  1153.         0/0/1, end cylinder/head/sector = anything, initial 
  1154.         offset = 0, total size = anything}.  This will tell the 
  1155.         NetBSD primary boot block, or a NetBSD system booted from 
  1156.         a floppy, that it should look for the NetBSD disk label 
  1157.         in {cyl 0, head 0, sec 2}.
  1158.  
  1159.         6.  Halt the system.  Boot the NetBSD kernel copy floppy.  When it
  1160.             asks you to insert the floppy for the root file system, just 
  1161.             press enter without changing disks.
  1162.  
  1163.         7.  Copy the kernel, and proceed with the rest of the installation 
  1164.             as per the instructions provided with NetBSD.  It should now 
  1165.             work because of the trickery with the partition table etc.
  1166.  
  1167. 2.5.6    My disk label is complaining about '256 heads' in the disklabel.
  1168.     This is obviously bogus, but it doesn't seem to be hurting anything.
  1169.     Is it Okay or should I fix it?
  1170.  
  1171.     Steve Gilbert (gilbert@cs.utk.edu) provided us with this answer:
  1172.  
  1173.         First, If you do a "fdisk wd1" (It may be wd1d, I don't
  1174.     remember what it wanted), it will list out the partition table
  1175.     for you.  This is something totally different from BSD's idea
  1176.     of a partition, mind you.  The last partition (#3) should be BSD.
  1177.     All of those figures are correct except for the "ending head" field
  1178.     which is set to 255 (thus, 256 heads).
  1179.  
  1180.     1. BACK UP EVERYTHING!
  1181.  
  1182.     2. fdisk -u wd1
  1183.  
  1184.         ...this will prompt you for the stuff you want to change.
  1185.         Remember, everything is correct execpt for the ending
  1186.         head.  Accept all the default values it gives you at first.
  1187.         You'll have to tell it that you want to explicitly define
  1188.         the beginning and ending values.
  1189.  
  1190.     3. My 420 MB Conner drive has 16 heads, so I just enter 15 as
  1191.        the ending head number.
  1192.  
  1193.     4. When you are back out of fdisk, you can do another fdisk wd1
  1194.        to make sure the values are correct.  Don't worry if you mess up,
  1195.        you can always change it again.  Anything you didn't back up is
  1196.        probably gone by now anyway :-)
  1197.  
  1198.     5. Reboot and watch NO error message pop up!
  1199.  
  1200.     ...remember that all you want to do is fdisk the drive.  You do NOT
  1201.     want to run disklabel again or newfs the partitions again.  This will
  1202.     write the incorrect 256 crap back.  I did this three times before
  1203.     I finally got smart and did it right.
  1204.  
  1205.  
  1206. 2.5.7    What are the options for the bootup prompt?
  1207.  
  1208.     The options are supposed to be as follows:
  1209.  
  1210.     -s............... boot into single user mode
  1211.     -a............... ask the user what device to use as root
  1212.               just before mounting it (Not presently supported)
  1213.     -d............... once you have the kernel loaded and VM and such up
  1214.               and going, drop into the kernel debugger.
  1215.               (great for debugging probe code)
  1216.               (not sure if this is presently working)
  1217.  
  1218.  
  1219. 2.5.8    I am having trouble installing WRT 'syslogd: bind: Can't assign 
  1220.     requested address' errors.  What are some of the things I should
  1221.     look at?  I also am having trouble with the network: 'starting 
  1222.     network ... ifconfig: localhost: badvalue'.
  1223.  
  1224.     This is caused by incorrect settings in /etc/netstart and/or
  1225.     /etc/hosts.
  1226.  
  1227.     In /etc/hosts, you must have a line that says:
  1228.  
  1229.     127.0.0.1        localhost    localhost.my.domain
  1230.  
  1231.     Errors that will result if you don't do this: ifconfig will not
  1232.     be able to figure out what IP address goes with the name
  1233.     'localhost' and you'll get 'localhost: bad value.'
  1234.  
  1235.     In /etc/netstart, you must do:
  1236.  
  1237.         ifconfig lo0 localhost
  1238.         route add {hostname} localhost
  1239.  
  1240.     Errors that will result if you don't do this: the loopback
  1241.     device will not be properly configured and/or you will have no
  1242.     route to it. The result is that programs expecting to have
  1243.     networking enabled (including syslog and friends) will get
  1244.     horribly confused.
  1245.  
  1246.     *AND*, if you're not going to be directly connected to a
  1247.     network, you should change /etc/host.conf to say:
  1248.  
  1249.         hosts
  1250.         bind
  1251.  
  1252.     It's set up the other way around by default. I don't like it
  1253.     that way myself.
  1254.  
  1255.     Errors that can result if you don't do this: if you don't have
  1256.     a nameserver available to you, the resolver will have trouble 
  1257.     translating hostnames into IP addresses.  Bogosity levels will
  1258.     be off the scale. (Note also that if you do have access to a 
  1259.     nameserver, you need to set up /etc/resolv.conf to point to
  1260.     it.)  By changing the order, you'll be telling the resolver to
  1261.     check the host files for matches *first*, then roll over to the 
  1262.     nameserver (if any) if no match is found.
  1263.  
  1264.     Make sure that:
  1265.  
  1266.     - There are no typos in any of the three files mentioned above.
  1267.     - There are no bogus non-ASCII characters in the files
  1268.     mentioned above.
  1269.     - All three files have their read permission bits set.
  1270.  
  1271.     Lastly, be very careful with /etc/hosts.equiv. If you add a
  1272.     hostname to it, say 'otherhost.domain,' then root on
  1273.     otherhost.domain will be able to rsh/rlogin to your machine
  1274.     without a password.
  1275.  
  1276.     Once you have everything set correctly, you should be able to
  1277.     type 'telnet localhost' and establish a connection to yourself. 
  1278.     If you get an error such as 'localhost: unknown host' or
  1279.     'network unreachable' then you still have work to do.
  1280.  
  1281.  
  1282. 2.6    Common installation problems.
  1283.  
  1284.     There are many common installation problems.  This section covers
  1285.     the most basic and common of these problems.  In addition to this
  1286.     section, you should also read through the other sections of the
  1287.     FAQ, since many of the less common questions are answered in other
  1288.     places in the doc.
  1289.  
  1290. 2.6.1    Swap space not identified correctly.
  1291.     
  1292.     There are several levels of problems associated with swap space.  
  1293.     The first is that the swap space on a second disk will not get 
  1294.     used if it is not in your /etc/fstab file.  Your /etc/fstab should 
  1295.     have the swap space identified.  The following is a representative 
  1296.     fstab:
  1297.     
  1298.     /dev/wd0a        /        ufs  rw 1 1
  1299.     /dev/wd1b        swap        swap sw 0 0
  1300.      
  1301.     Another common question is that the install program installs the
  1302.     swap partition in the 'b' partition, but does not mark it correctly
  1303.     as a swap partition.  The swapping software will use the swap 
  1304.     partition regardless of what it is called, but it should still be
  1305.     identified in the disklabel as the swap partition.  Use 'disklabel'
  1306.     to change the partition type from 'unused' to 'swap'.
  1307.  
  1308.     NOTE:  I mean it when I say that 386bsd will use the b: partition
  1309.     for swap without regard to what you called it.  If it was your 
  1310.     root partition, it will be toast the first time you try to swap
  1311.     a process out to disk.  I'm not kidding!
  1312.  
  1313.  
  1314. 2.6.2    Endless reboot cycles.
  1315.     
  1316.     Endless reboot cycles are the single most vexing aspect of 386bsd.  
  1317.     Part of the problem is that the 0.1 distribution boot routines 
  1318.     were never checked against many types of computers and have bugs.  
  1319.     Most of the bugs are fixed in the patchkit, but that doesn't do 
  1320.     the average novice user any good.
  1321.     
  1322.     In general, this will show up as a "bad disk label" error, and 
  1323.     can result in in not booting from the hard drive "most of the time".  
  1324.     You may be able to partially (or even completely) work around this 
  1325.     problem by making your machine run at a lower clock rate.
  1326.  
  1327.     This problem is the result of the kernel reading the wrong register 
  1328.     waiting for the drive controller to come ready.  On some 
  1329.     controllers, this isn't a problem; on others, it's fatal.
  1330.     This problem is solved for almost all controllers in the patchkit
  1331.     and both FreeBSD and NetBSD.
  1332.  
  1333.     The correct solution is to use a patched "dist.fs" or "fixit.fs" 
  1334.     boot disk.  Since these are no longer available, using an
  1335.     unpatched 386BSD 0.1 is a not a possibility any longer if you
  1336.     have this problem.  You will have to upgrade to either FreeBSD 
  1337.     or NetBSD.
  1338.  
  1339.     Another incarnation of this symptom is that the disk geometry on 
  1340.     your disk label (as installed by install) is different than the 
  1341.     geometry that your hard drive controller thinks it is using.  This 
  1342.     will most often manifest itself on controllers that insist on 
  1343.     operating in some type of translation mode.  Normally the fix is to 
  1344.     find out what the controller geometry is and make the disk label 
  1345.     agree.  There are programs available to help with this problem.  
  1346.  
  1347.     Julian's new boot blocks may also solve this problem.  They are 
  1348.     available where fine precompiled kernels may be found.  Also, they
  1349.     are included in the patchkit as of version 0.2.2.
  1350.  
  1351.  
  1352. 2.7    The computer just sits there, or 'that isn't right'.
  1353.     
  1354.     This class of problems is sometimes caused by an incorrect FTP of 
  1355.     the boot disk.  Make sure that the files were grabbed in 'binary' 
  1356.     mode and that the size reported back is 1244000 bytes.  Use the 
  1357.     Unix program 'dd' or the DOS program RAWRITE to put these files 
  1358.     onto the diskette.  In addition, this is the 'miscellaneous' 
  1359.     section of the FAQ.  These problems are included here because they
  1360.     are usually preceded by 'I just finished installing...' 
  1361.  
  1362.     Another incarnation of this problem is that, sometimes, the major
  1363.     or minor device numbers for a particular device may not get made
  1364.     correctly in the install (or upgrade) procedure.  If you have a
  1365.     problem where you can install and everything seems to go well
  1366.     until you try to boot onto the hard drive, try running the
  1367.     MAKEDEV script that resides in /dev.  More the file to see what
  1368.     kind of options you should include (if the sd0a drive needs to
  1369.     be fixed, for example, the command './MAKEDEV sd0' should get
  1370.     your devices back on the road.  If that doesn't work, try one of
  1371.     the many things below.  It could be any (or all) of them....
  1372.  
  1373.  
  1374. 2.7.1    The boot disk works all right on one computer but not another. 
  1375.  
  1376.     This could be a problem with many different pieces, some of which
  1377.     are:
  1378.  
  1379.     - Misconfigured hardware.  The iomem, IRQ, and other board
  1380.     settings must match the ones listed in the INSTALL.NOTES.  
  1381.     Unfortunately, the INSTALL.NOTES are on the disk that will 
  1382.     not boot.  You can grab them via FTP from many archive sites.
  1383.     This installation file may have many names.  Look for something
  1384.     kind of obvious (like 'install.notes' or 'readme' or 
  1385.     'configuration guide') and you should find it.  Finally, there
  1386.     have been many reports (particularly with the BusLogic SCSI
  1387.     cards (specifically reported was the BT445C VLB host adapter) 
  1388.     where the system seems to boot up, but starts getting
  1389.     'stray interrupt c' messages.  This is usually caused by people
  1390.     having there SCSI card set up on some IRQ other than the one
  1391.     that the kernel expects.  The factory default for this card
  1392.     seems to be IRQ 12, but the kernel wants the card at IRQ 11.
  1393.     Setting the card (using the configuration program supplied)
  1394.     changes the setting so that it matches the kernel and the card
  1395.     then works.
  1396.  
  1397.     - Unsupported hardware.  There are several SCSI controllers on the 
  1398.     market that are not fully supported by 386bsd.  The Ultrastore 24F 
  1399.     (when not running in ISA emulation mode) is a good example of this.  
  1400.     There are also some network cards that are not directly supported 
  1401.     in 386bsd.  If you get into a real bind, you can post a question 
  1402.     to comp.os.386bsd.questions, and one of the many experienced 386bsd 
  1403.     gurus that reads that group will probably try to help you.
  1404.  
  1405.     
  1406. 2.7.2    Really strange errors in the various *BSD flavors.
  1407.  
  1408. 2.7.2.1    I am using the original 386bsd 0.1 with no patches installed
  1409.     and I get flashing multicolored characters and  a "ptdi 81061"
  1410.     prompt error?
  1411.     
  1412.     Since 386BSD 0.1 is no longer available, you will have to
  1413.     upgrade to either FreeBSD or NetBSD, which both deal with this
  1414.     problem directly.
  1415.     
  1416.  
  1417. 2.7.2.2    Using the new code in NetBSD, I get a "panic: pdti 206067" in 
  1418.     pmap_enter().  What should I do?
  1419.  
  1420.     Increase NKPDE in /sys/i386/include/pmap.h.  Be sure to keep
  1421.     the changes around as a patch file, since this is one of the
  1422.     files that will get overwritten during a source code update. 
  1423.  
  1424.  
  1425. 2.7.3a    I get the error "isr 15 and error: isr 17" on an NE2000 card.
  1426. 2.7.3b    I have some card on IRQ2 and it doesn't work; why?
  1427. 2.7.3c    I am getting lousy performance out of my network card.  What are 
  1428.         some of the other possibilities?
  1429.     
  1430.     The description of this problem is that one of the cards in your 
  1431.     system (most likely the VGA card) is either generating interrupts 
  1432.     or is causing the IRQ 2 to be actively disabled.  Older VGA card 
  1433.     uses IRQ 2 during vertical retrace to prevent sparklies.
  1434.  
  1435.     One solution would be to plan on not using your Ethernet card
  1436.     (or any other card you want on IRQ 2) until you have rebuilt
  1437.     the kernel so that it expects it at an interrupt other than 
  1438.     IRQ 2 or 9, re-jumper or reconfigure the card to match the IRQ 
  1439.     you have selected, and enable it.  
  1440.     
  1441.     From time to time, this problem will manifest itself as a general
  1442.     tendency of the network card to transfer either very sporadically
  1443.     or very slowly. It is precisely the same problem.
  1444.  
  1445.     James Van Artsdalen (james@bigtex.cactus.org) has offered at
  1446.     least one solution:
  1447.     
  1448.         If this is the problem, you can use Scotch tape to cover
  1449.         the IRQ 2 signal on the VGA's ISA connector.
  1450.     
  1451.     There has been some discussion as to whether scotch tape is really 
  1452.     appropriate inside a card slot.  My answer would be "yes".  This is 
  1453.     because the alternate solution of cutting the trace on the video 
  1454.     board seems, to my mind, to reduce the value of the board.  It is 
  1455.     possible that, in the future, with a bi-bipartite driver, you would 
  1456.     want to catch the retrace interrupt to get rid of "sparklies" or to 
  1457.     implement a driver for a very high resolution monitor for X.  If 
  1458.     this happens, given a choice between alcohol and solder, I vote for 
  1459.     alcohol.
  1460.     
  1461.     Either way, you will probably find that your VGA card uses IRQ 2
  1462.     strictly for compatibility with older cards.  With the advent of
  1463.     dual-ported memory for video cards, virtually all of these types
  1464.     of problems have disappeared.
  1465.  
  1466.  
  1467. 2.7.4    What is the difference between IRQ2 and IRQ9?  Are they really
  1468.     the same, or are they really different?  
  1469.  
  1470.     On the XT, there was one interrupt controller, an Intel 8259, which
  1471.     handled 8 interrupts numbered IRQ0 through IRQ7.  IRQs 2 through 7
  1472.     were accessible via bus lines IRQ2 through IRQ7.
  1473.  
  1474.     The AT had two interrupt controllers.  Due to the design of the 
  1475.     8259, one has to be the master and the rest (up to 8) must be 
  1476.     slaves.  Each slave controller output its interrupt request to 
  1477.     and input on the master controller.  In the case of the AT, the
  1478.     master controller handles IRQ0 through IRQ7.  The slave handles
  1479.     IRQ8 through IRQ15.  The interrupt request from the slave to the
  1480.     master goes through IRQ2, which is termed the cascase input.
  1481.  
  1482.     This means. of course, that the bus line for IRQ2 could no longer
  1483.     be used for external interrupts.  Instead, the bus line that WAS
  1484.     IRQ2 in the XT became IRQ9 on the AT.  This whole issue is 
  1485.     confused further by the fact that some vendors refer to this
  1486.     external interrupt as IRQ2, while others refer to it as IRQ9.  In
  1487.     either case, if you are talking about an external interrupt, it
  1488.     means the same thing.
  1489.  
  1490.     BTW, IRQ8 is used for the Real Time Clock, and does not have an
  1491.     external interrupt.  Here is a map, in case anyone still needs it:
  1492.  
  1493.         Internal    External    Function
  1494.         IRQ0        n/a        Refresh/Timer
  1495.         IRQ1        n/a        Keyboard
  1496.         IRQ2        n/a        Cascade Input to Master
  1497.         IRQ3        IRQ3        Free (Com port)
  1498.         IRQ4        IRQ4        Free (Com port)
  1499.         IRQ5        IRQ5        Free 
  1500.         IRQ6        IRQ6        Free
  1501.         IRQ7        IRQ7        Free (Printer)
  1502.         IRQ8        n/a        Real Time Clock
  1503.         IRQ9        IRQ2        Free (Network card)
  1504.         IRQ10        IRQ10        Free
  1505.  
  1506.         etc.
  1507.  
  1508.  
  1509. 2.7.5    Some of my SCSI devices (like a tape drive) don't work; why?
  1510.     
  1511.     That is because the original 386bsd 0.1 SCSI drivers didn't 
  1512.     recognize any devices past the first two (ID 0 and ID 1).  Also, 
  1513.     there was a bug in the distribution floppy regarding the devices 
  1514.     at ID 6.  The 'dev' files in 386bsd 0.1 for that id need to be 
  1515.     remade.  Use MAKEDEV to do that.
  1516.  
  1517.     The disks and tapes will be recognized and configured when they 
  1518.     are first accessed. 
  1519.     
  1520.     A new and improved SCSI driver has been written by Julian Elischer 
  1521.     and is available from many sources.  It includes support for many 
  1522.     new types of SCSI controllers and many devices that are thereby 
  1523.     attached.  This driver is included in the patchkit.
  1524.  
  1525.     In addition, many of these types of devices are supported in 
  1526.     FreeBSD and NetBSD.  If one of the devices you are interested
  1527.     in using is not supported in 386BSD, you might try one of these
  1528.     newer systems.
  1529.  
  1530.     Even with the newer systems, you run the risk of having a 
  1531.     problem with a SCSI device from time to time.  There are some
  1532.     cards (like the new Adaptec 27* series) that software drivers 
  1533.     are either not in the works or the documentation is simply
  1534.     unavailable.  Another culprit here is that some machines are
  1535.     very touchy about the quality and length of cables, as well 
  1536.     as SCSI IDs.  There was one report of a older hard drive that
  1537.     took a little longer to spin up than the rest of the drives
  1538.     in the chain.  Whenever this drive was put early in the ID
  1539.     string (like 1 or 2) it would be 'not found' but if it was
  1540.     placed near the end (like after the tape drive) it would have
  1541.     spun up and been found.
  1542.  
  1543.     Who says computers are logical?
  1544.  
  1545.  
  1546. 2.7.6    I try to run 'ps' or 'w' and get ': cannot get namelist'
  1547.     from the TinyBSD kernel.  What did I do wrong?
  1548.  
  1549.     Nothing.  There is a class of programs that interact directly
  1550.     with the current kernel.  These programs include 'ps', 'w',
  1551.     'uptime', and others.  The kernel on the TinyBSD disk is not
  1552.     capable of supporting these programs because the symbol table
  1553.     that these programs use has been stripped out of the kernel to
  1554.     save space.  The easiest way to fix this is to get a different 
  1555.     kernel (build it yourself).  Of course, you can have a fully
  1556.     functional system with these programs, but they are nice to have.  
  1557.  
  1558.  
  1559. 2.7.7    I get a 'Floating point constant out of range' when I try to
  1560.     compile package 'n'.  What is broke?
  1561.  
  1562.     This problem was encountered during many package compilations, 
  1563.     including compiling gcc-2.3.3 under NetBSD-0.8.  
  1564.  
  1565.     NetBSD-0.9, and presumably FreeBSD, contain a repaired printf()
  1566.     function, which corrects this problem.  The easiest solution for
  1567.     this (and MANY other) problems is to upgrade.  In addition, these
  1568.     systems also include gcc-2.3.3 (or newer) as the default compiler.
  1569.  
  1570.     There is also a circular dependency for protoize.o/unprotoize.o 
  1571.     in the Makefile. Add the lines
  1572.  
  1573.           touch protoize.o
  1574.           touch unprotoize.o
  1575.  
  1576.     after the line:
  1577.  
  1578.           touch stamp-proto
  1579.  
  1580.     After this "make bootstrap" will run to completion.
  1581.  
  1582.     gas apparently has bugs too.  It should produce +Infinity.  I 
  1583.     think it is OK internally but it may be trusting the library 
  1584.     too much.  gcc can easily be changed to avoid printf for output, 
  1585.     but input is harder.
  1586.  
  1587.      One of the problems is that various pieces of code rely on the
  1588.      value of DBL_MAX.  A kludge to fix it is to change the line
  1589.      below:
  1590.  
  1591.     #define DBL_MAX         1.7976931348623157E+308
  1592.  
  1593.     One value that works is
  1594.  
  1595.      #define DBL_MAX         1.7976931348623147E+308
  1596.                                             ^ was 5
  1597.  
  1598.     This is a kludge, but it does mostly work.
  1599.  
  1600.  
  1601.     The problem is entirely in printf() (really in cvt()), NOT in
  1602.     atof().  I have inspected the output of atof() bit by bit, and 
  1603.     it is well within IEEE specification.
  1604.  
  1605.     The digits `157' are the `best' approximation.
  1606.  
  1607.     The code for printf() generates a representation which is not even 
  1608.     in the range of doubles.  Below are the details:
  1609.  
  1610.     atof("1.7976931348623157e+308") returns 
  1611.     
  1612.          0x7fefffffffffffff
  1613.  
  1614.     which is the maximum double value and is correct.  However, 
  1615.     printf() of the previous yields `1.7976931348623168e+308', which 
  1616.     isn't even within the floating point range.  It is clearly printf() 
  1617.     that is broken, and a quick inspection of the code is enough to 
  1618.     determine that it uses a pessimal algorithm.
  1619.  
  1620.     atof() has been tested with many other values, and it has never 
  1621.     been off by more than is allowed by IEEE 754 (though it is not 
  1622.     optimal).
  1623.  
  1624.  
  1625. 2.7.8    I want to use the Adaptec 1542C SCSI controller.  What are the 
  1626.     problems/tricks you need to know to get it working?
  1627.  
  1628.     The first thing to check when trying to use the 1542C is the setting 
  1629.     of 'Enable Disconnection' under the 'SCSI Device Configuration' 
  1630.     menu.  It should be set to YES for all devices, as the manual warns 
  1631.     you. 
  1632.  
  1633.     Matthias Urlichs (urlichs@smurf.ira.uka.de) has provided this 
  1634.     description of the types of things that can cause problems for the
  1635.     controller and devices attached to it.
  1636.     
  1637.     The problem is that the Adaptec 1542C has (a) rather powerful line 
  1638.     drivers, and (b) is sensitive to transient signals which can be 
  1639.     induced by them via either a bad cable or a bad external terminator.
  1640.  
  1641.     A bad cable is almost any cable which doesn't meet SCSI-2 specs.
  1642.  
  1643.     A bad external terminator is one which doesn't adequately buffer 
  1644.     its resistor network.
  1645.  
  1646.     So...
  1647.  
  1648.     - Remove the internal terminator from the last drive in your chain. 
  1649.       Replace with an active SCSI-2 external terminator.  Side 
  1650.       improvement: active terminators consume a bit less power.
  1651.  
  1652.     - Check cables.  Specifically, some cables carry less than the 
  1653.       nominal 50 signal wires. Manufacturers sometimes think they can 
  1654.       get away with this because almost all odd-numbered pins are GROUND 
  1655.       anyway. So, if pins 1 and 3 or 3 and 5 are connected, you're 
  1656.       likely to have a marginal cable.
  1657.  
  1658.     - Make sure that the terminator power is supplied by all devices 
  1659.       and that the power pin is actually connected on your cable. The 
  1660.       problem here is that some idiot device manufacturers save on 
  1661.       2-cent diodes, which means that the thing will pull terminator 
  1662.       power to ground if it's not plugged in.  (Two of these on one 
  1663.       bus are even worse.)
  1664.  
  1665.     - Consider creating your own cabling. Take a 50-wire flat ribbon 
  1666.       and press the appropriate connectors onto it in precisely the 
  1667.       right places. (Move your devices as to minimize cable length.) 
  1668.       Be aware that if a device has two external connectors, you must 
  1669.       take the SCSI bus in at one connector and out at the other 
  1670.       -- don't leave the other connector dangling; this isn't within 
  1671.       the SCSI specs because the cable usually is too long.
  1672.  
  1673.     - Better but more expensive: use 2-twisted cable. (I.e., wires 1&2 
  1674.       are twisted around each other, wire 3&4, ...) This will improve 
  1675.       reliability because the wires are twisted at different rates. 
  1676.       These cables have short non-twisted segments every 50 cm (1.5') 
  1677.       so that you can press on your connectors instead of heating up 
  1678.       that soldering iron.
  1679.  
  1680.     - While you're rebuilding your system anyway...: If you have more 
  1681.       than one drive per power supply, check if these drives have 
  1682.       adequate condensors to buffer their power.  I have two 80-MB 
  1683.       Seagates which refused to work more than a few hours without 
  1684.       glitches -- then I soldered two 10-uF Tantals onto their power 
  1685.       connector and they've been flawless ever since.
  1686.  
  1687.     The terminator power is pin 26. Be aware that SCSI counts pins as 
  1688.     they appear on a ribbon cable, not as they're sometimes numbered 
  1689.     on the connectors.  Pin 25 is supposed to be disconnected.
  1690.  
  1691.  
  1692. 2.8    Other common problems that are attributed to the installation
  1693.     process but are caused other places.
  1694.     
  1695. 2.8.1    Why don't the man pages for "magic" and "file" work?
  1696.  
  1697.     The manual page for magic and file all have two dots before the 
  1698.     commands,  e.g.. "..SH" it should be ".SH" just delete one of the 
  1699.     double dots in the whole file and then it will work.  These man 
  1700.     pages are fixed by both the patch-kit, NetBSD, and FreeBSD.  The
  1701.     only time this problem every occurs is when you are using the
  1702.     distribution from one of the old CD-ROM distributions are get the
  1703.     original 386bsd 0.1 release.
  1704.  
  1705.  
  1706. 2.8.2    Why is apropos broke?
  1707.  
  1708.     The Makefile in /usr/othersrc/share/man/Makefile creates the 
  1709.     whatis.db.  The problem is that it doesn't strip the backspaces in 
  1710.     the title and apropos can't handle that.  So add a "col -b" to strip 
  1711.     those.
  1712.  
  1713.     excerpt from the Makefile.
  1714.  
  1715.     makedb:
  1716.        for file in `find /usr/share/man -type f -name '*.0' -print`; do \
  1717.         sed -n -f /usr/share/man/makewhatis.sed $$file; \
  1718.        done | col -b | sort -u > whatis.db
  1719.        install -o ${BINOWN} -g ${BINGRP} -m 444 whatis.db \
  1720.                   ${DESTDIR}/usr/share/man
  1721.  
  1722.     This problem is also solved in the patchkit, and other *BSD releases.
  1723.  
  1724.     Also, if the Makefile is moved to the /usr/share/man directory, the 
  1725.     whatis.db will reside where it needs to eventually reside, and the 
  1726.     install will wipe it out.  An easy fix for that problem is to change 
  1727.     the two references of whatis.db in the excerpt above to 
  1728.     /tmp/whatis.db.  This will ensure the file is correctly built and 
  1729.     installed.
  1730.  
  1731.  
  1732. 2.8.3    I want to use more than 16 Megabytes of memory.  Will any of the 
  1733.     BSD based systems support it?
  1734.  
  1735.     Early on, 386bsd 0.1 would choke radically on any system that had
  1736.     more than 8M of memory.  With the advent of the patchkit, this 
  1737.     problem was, for the most part, solved; memory could then expand to
  1738.     the 16M limit inherent in the ISA bus.
  1739.  
  1740.     As people started using VESA and EISA busses, however, attempts 
  1741.     were made to push the envelope even further.  Memory limits have 
  1742.     expanded seemingly without limit.  Since the EISA bus (for example) 
  1743.     has 32 address lines, it is capable of supporting more memory than 
  1744.     the ISA bus with its 24 address lines.  While the 386 and 486 are
  1745.     capable of addresses up to 4 Gigabytes (considerably more than the 
  1746.     ISA bus allows) the ISA bus is still the primary limitation.
  1747.  
  1748.     When using NetBSD and FreeBSD, there is no SOFTWARE limitation on 
  1749.     more than 16Meg of memory.  There are still hardware limitations.
  1750.     The limit is caused by DMA controllers which copy memory images
  1751.     around the system.  Many cards which people use in VESA and EISA
  1752.     machines either emulate ISA cards (in order to work with *BSD) or
  1753.     are really ISA cards.  There are reports of people having trouble 
  1754.     with more than 64Meg of memory, but anyone rich enough to have
  1755.     that kind of memory should be paying for his OS. :-)
  1756.  
  1757.     Recently some folks have been reporting that they are getting 
  1758.     warnings like these:
  1759.  
  1760.         hostname /netbsd: sd0: not queued
  1761.         hostname /netbsd: aha0: DMA beyond end of ISA
  1762.         hostname /netbsd: sd0: not queuedaha0: DMA beyond end of ISA
  1763.  
  1764.     This error is caused when the buffer for I/O is beyond the address
  1765.     range that the ISA bus can reach.  With 16M you should be okay,
  1766.     however, some motherboards do reclaim all or part of the "lost" 
  1767.     384K (from the I/O "hole" from A0000-FFFFF) and put it just beyond 
  1768.     the end of the rest of the memory, so you actually get 16M plus a
  1769.     little bit.
  1770.  
  1771.     One fix is bounce buffers.  FreeBSD has implemented this, and NetBSD
  1772.     will as soon as they come up with a method that is compatible with 
  1773.     all of the machines that NetBSD supports.  
  1774.  
  1775.     Another fix is to either turn off the reclaiming of the extra memory 
  1776.     (most motherboards that do this allow you to disable it), hack 
  1777.     machdep.c to force the physical memory used to 16M, or use a 32 bit 
  1778.     bus (EISA, VLB, or PCI) controller.
  1779.  
  1780.     Jordan K Hubbard (jkh@thrush.lotus.com) has provided this 
  1781.     explanation of the distinction:
  1782.  
  1783.     Just so long as you're using a DMA-using disk controller in EISA 
  1784.     mode, rather than ISA mode, you can use more than 16 Meg of memory.
  1785.  
  1786.     For those who may find such a distinction confusing, let me explain:
  1787.  
  1788.     You can use an ISA controller (such as an Adaptec 1542) in an EISA
  1789.     machine, but as it will still think it's in an ISA box and refuse to
  1790.     use the extra address lines, this is no different than having an
  1791.     ISA machine as far as >16MB is concerned.
  1792.  
  1793.     You can use an EISA controller in "ISA mode", meaning it uses the
  1794.     older protocols for compatability reasons (examples being Adaptec 
  1795.     1742 in "standard" mode, DTC 3290 in "Adaptec" mode, etc.) and 
  1796.     again, does not use the extra address lines.
  1797.  
  1798.     The only way to get full EISA, 32MB-of-memory-and-everything, mode 
  1799.     is to use an EISA controller in full EISA mode (for Adaptec 1742, 
  1800.     this is "enhanced" mode, for DTC 3290 it's "DTC" mode, the 
  1801.     Ultrastor 24F in EISA (rather than IDE emulation) mode, etc.).
  1802.  
  1803.     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1804.  
  1805.     In addition, several other types of ISA controllers which do NOT
  1806.     use DMA will not cause problems.  IDE, ESDI, and RLL controllers
  1807.     are examples of this type of card.  The discussion above also applies
  1808.     to VESA and VLB cards. 
  1809.  
  1810.     So, the bottom line is that you are limited to the amount of memory
  1811.     that your DMA equipped devices can access.  Once again, the weakest
  1812.     link is the strength of your machine.
  1813.  
  1814.  
  1815. 2.8.4    I tried to use a device in my computer that should be there.  When 
  1816.     I did, I got a "Device not configured error."  What do I do now?
  1817.  
  1818.     Garrett A. Wollman (wollman@emba.uvm.edu) provides us with this
  1819.     brief discussion in answer to a specific question.  It wears well
  1820.     as a generic answer as well.
  1821.  
  1822.     When any program tells you ``Device not configured'', it's trying 
  1823.     to tell you something very important about what you tried to do:
  1824.     namely, that the device you tried to access is not configured 
  1825.     into the running operating system.  This is the error message 
  1826.     corresponding to ENXIO.
  1827.  
  1828.     There are three major causes for this error:
  1829.  
  1830.     1) The kind of device you requested was not configured into the
  1831.        system.  This is R.W.'s problem; the generic kernels 
  1832.        are not distributed with the Berkeley Packet Filter enabled by 
  1833.        default.  To correct this, you must add the appropriate device or
  1834.        pseudo-device to your kernel configuration file and recompile.  
  1835.        (In this particular case, `pseudo-device bpfilter
  1836.        number-of-network-interfaces'.)
  1837.  
  1838.     2) The kind of device you requested was configured into the system,
  1839.        but either the device you requested would use more than the
  1840.        maximum you configured into the system, or if a physical device,
  1841.        was not found during autoconfiguration.  To solve this, either
  1842.        change your configuration file, or change the I/O settings on the
  1843.        device to match what the file says.
  1844.  
  1845.     3) The major or minor device number specified by the device's
  1846.        entry(ies) in /dev is incorrect.  To solve this, re-MAKEDEV the
  1847.        device (read the MAKEDEV script for more details).  Hopefully
  1848.        whatever change caused the kernel's internal device tables to get
  1849.        changed also updated your MAKEDEV script; otherwise, you will have
  1850.        to grovel through the kernel to see what is going on.
  1851.  
  1852. -- 
  1853. TSgt Dave Burgess           | Dave Burgess
  1854. NCOIC, USSTRATCOM/J6844     | *BSD FAQ Maintainer
  1855. Offutt AFB, NE              | Burgess@cynjut.infonet.net or ...@s069.infonet...
  1856.                                
  1857.  
  1858.